import React, { Component } from 'react';

// 引入两个组件 密码登录组件 和 短信登录组件
import NormalLogin from './NormalLogin'
import MobileLogin from './MobileLogin'
import { Card, Tabs } from 'antd';
import '@/assets/css/login.css';
const { TabPane } = Tabs;
class Login extends Component {
    // 切换选项卡
    onChange = (key) => {
        console.log(key);
    };
    render() {
        return (
            <div className="site-card-border-less-wrapper">
                <Card
                    bordered={false}
                    style={{
                        width: 300,
                    }}
                >
                    <Tabs defaultActiveKey="1" onChange={this.onChange} tabBarGutter={100} centered={true}>
                        <TabPane tab="密码登录" key="1">
                            {/* 密码登录组件 */}
                            <NormalLogin></NormalLogin>
                        </TabPane>
                        <TabPane tab="短信登录" key="2">
                            {/* 短信登录组件 */}
                            <MobileLogin></MobileLogin>
                        </TabPane>
                    </Tabs>

                </Card>
            </div>
        );
    }
}

export default Login;
